@mixin arrow {
	content: '';
	display: block;
	width: 8px;
	height: 8px;
	border-right: var(--accordion-width-arrow-icon) solid var(--color-icon);
	border-bottom: var(--accordion-width-arrow-icon) solid var(--color-icon);
	position: absolute;
	top: 50%;
	right: 3px;
	transform-origin: center;
	transform: translateY(-50%) rotate(-45deg);
	transition: transform 0.25s ease-in-out;
}

.cq-accordion {
	--accordion-label-padding: 12px;
	--accordion-width-arrow: 20px;
	--accordion-width-arrow-icon: 2px;
	--accordion-color-border: var(--color-border);
	display: block;
	border: 1px solid;
  border-color: var(--accordion-color-border);

	&.click {
		.cq-accordion--append,
		.is-alone {
			&::after {
				transform: translateY(-50%) rotate(45deg);
			}
		}
		.cq-accordion--content {
			opacity: 1;
			transform: scale(1);
		}
	}
}

.cq-accordion--lable {
  @include simple-hover-style;
	width: 100%;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: var(--accordion-label-padding);
	transition: background-color 0.2s;
	cursor: pointer;

	&.is-alone {
		position: relative;
		&::after {
			@include arrow;
			margin-right: var(--accordion-label-padding);
		}
	}
}

.cq-accordion--append {
	position: relative;
	display: flex;
	align-items: center;
	min-height: var(--accordion-width-arrow);
	padding-right: var(--accordion-width-arrow);
	box-sizing: border-box;
	text-align: right;
	font-size: 12px;
	font-weight: normal;
	color: #a1a1a1;
	letter-spacing: 3px;
	text-overflow: ellipsis;
	white-space: nowrap;
	overflow: hidden;

	&::after {
		@include arrow;
	}
}

.cq-accordion--content {
	width: 100%;
	height: 0;
	border-top: 1px solid var(--color-border);
	opacity: 0;
	transform: scale(0.9);
	transition: all 0.25s ease-in-out !important;
	overflow: hidden;
}
